package
{
	import org.flixel.*;
 
	public class MenuState extends FlxState
	{
		override public function create():void
		{
			FlxG.bgColor = 0xFF000000;
			
			var title:FlxText;
			title = new FlxText(0, 16, FlxG.width, "Chromatose");
			title.setFormat (null, 20, 0xFFFFFFFF, "center");
			add(title);
 
			var controls:FlxText;
			controls = new FlxText(0, FlxG.height/2, FlxG.width, "Arrow Keys - Move Player\nSpace - Jump\nQ - Change to Green\nW - Change to Blue\nE - Change to Yellow");
			controls.setFormat (null, 14, 0xFFFFFFFF, "center");
			add(controls);
			
			var instructions:FlxText;
			instructions = new FlxText(0, FlxG.height - 32, FlxG.width, "Press Space To Play");
			instructions.setFormat (null, 14, 0xFFFFFFFF, "center");
			add(instructions);
			
			[Embed(source = '../res/menu_music.mp3')] var menu_music:Class;
			FlxG.play(menu_music, 1, true);
 
		} // end function create
 
 
		override public function update():void
		{
			super.update(); // calls update on everything you added to the game loop
 
			if (FlxG.keys.justPressed("SPACE"))
			{
				FlxG.switchState(new PlayState(1));
			}
 
		} // end function update
 
 
		public function MenuState()
		{
			super();
 
		}  // end function MenuState
 
	} // end class
}// end package